<link href="/assets/css/order/order_detail.css" rel="stylesheet">


<div class="panel panel-default panel-intro">
    <div class="order-detail">
        <ul class="order-block

                {if condition = '$row.complete_time'}  progress-3
                    {elseif condition = '$row.pay_time'}  progress-2
                        {elseif condition = '$row.createtime'}  progress-1
        {/if}">
            <li>
                <span>下单时间</span>
                <div class="tip">{if condition = "$row.createtime"}{$row["createtime"]|date="Y-m-d H:i:s", ###}{/if}</div>
            </li>
            <li>
                <span>付款</span>
                <div class="tip">{if condition = "$row.pay_time"}{$row["pay_time"]|date="Y-m-d H:i:s", ###}{/if}</div>
            </li>

            <li>
                <span>完成</span>
                <div class="tip">{if condition = "$row.complete_time"}{$row["complete_time"]|date="Y-m-d H:i:s", ###}{/if}</div>
            </li>
        </ul>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">商品信息</div>
                <div class="panel-body">
                    <p><span>订单号：</span><small>{$row.order_sn}</small> <span style="margin-left: 30px;">买家：</span><small>{$row.user.nickname ?? ''}</small> <span style="margin-left: 30px;">手机号：</span><small>{$row.user.mobile ?? ''}</small><strong></strong></p>
                    <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
                    <table class="table table-bordered">
                        <thead>
                        <tr>

                            <th class="text-left">
                                <div class="th-inner">课程图片</div>
                            </th>
                            <th class="'text-left">
                                <div class="th-inner">课程</div>
                            </th>
                            <th class="'text-left">
                                <div class="th-inner">校区</div>
                            </th>
                            <th class="'text-left">
                                <div class="th-inner">班次</div>
                            </th>

                            <th class="'text-left">
                                <div class="th-inner">时间段</div>
                            </th>
                            <th class="'text-left">
                                <div class="th-inner">老师</div>
                            </th>

                        </tr>
                        </thead>
                        <tbody>

                            {foreach $orderGoods as $orderGood}
                            <tr>
                                <td><a href="javascript:"><img class="img-sm img-center" src="{$orderGood.image}"></a></td>
                                <td><strong>{$orderGood.course_name}</strong></td>
                                <td>{$orderGood.school_name}</td>
                                <td>{$orderGood.classes_name}</td>
                                <td>{$orderGood.time_name}</td>
                                <!--                            <td>{$orderGood.teacher.nickname??''}</td>-->
                                <td>
                                    {if condition='$is_read == 1'}
                                    {$orderGood.teacher.nickname??''}
                                    {else/}
                                    <div class="form-group">

                                        <div class="col-xs-12 col-sm-8">
                                            <input style="width: 150px" data-rule="" data-source="user/teacher/selectpage" class="form-control selectpage" name="row[{$orderGood.id}][teacher_id]" data-field="nickname"  type="text" value="{$orderGood.teacher_id}" data-params='{"custom[user_type]":"2","custom[school_id]":"{$orderGood.school_id}"}' placeholder="选择老师">
                                        </div>
                                    </div>
                                    {/if}


                                </td>
                            </tr>
                            {/foreach}

                        </tbody>
                        <tfoot>

                        <tr>

                            <th colspan="10" style="text-align: right;">
                                {if condition='$is_read == 0'}
                                <div class="form-group layer-footer  " style="position: inherit ">
                                    <label class="control-label col-xs-12 col-sm-2"></label>
                                    <div class="col-xs-12 col-sm-8">
                                        <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
                                        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                    </div>
                                </div>
                                {/if}
                                <span class="ordertext">课程金额：<samp class="text-red">￥{$row.course_price}</samp></span>
                                <span class="ordertext">支付金额：<samp class="text-red">￥{$row.money}</samp></span>
                                {if condition="$row.discount_money > 0"}
                                <span class="ordertext">优惠金额：<samp class="text-red">￥{$row.discount_money}</samp> </span>
                                {/if}
                                {if condition="$row.vip_discount_money > 0"}
                                <span class="ordertext">会员优惠金额：<samp class="text-red">￥{$row.vip_discount_money}</samp> </span>
                                {/if}
                            </th>
                        </tr>
                        </tfoot>
                    </table>

                    </form>
                    <div style="color: #333;">
                        <!--                        <p style="margin-bottom: 15px;">备注：{$row.remark ?? '无'}</p>-->
                        <p style="margin-bottom: 15px;">
                            <!--                            平台：<span class="label label-info">{$row.pay_from_text}</span>-->
                            支付方式：<span class="label label-info">{$row.pay_type_text}</span>
                        </p>
                        <p style="margin-bottom: 15px;">订单类型：<span class="label label-success">{$row.type_text}</span></p>
                        <p style="margin-bottom: 15px;">交易状态：<span class="label label-warning">{$row.status_text}</span></p>
                        {if condition = '!empty($row.refund_content)'}
                        <p>退款原因：<small>{$row.refund_content??''}</small></p>

                        {/if}
                        <p>学员姓名：<small>{$row.student_name??''}</small></p>
                        <p>家长姓名：<small>{$row.parent_name??''}</small></p>
                        <p>联系方式一：<small>{$row.phone_1??''}</small></p>
                        <p>联系方式二：<small>{$row.phone_2??''}</small></p>
                        <p>身份证号：<small>{$row.phone_3??''}</small></p>


                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    操作日志
                </div>
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {if condition="count($logs)>0"}
                    {foreach $logs as $log}
                    <tr>
                        <td>{$log.createtime |date="Y-m-d H:i:s", ###}</td>
                        <td>{$log.content}</td>
                    </tr>
                    {/foreach}
                    {else /}
                    <tr>
                        <td colspan="2" style="text-align: center">暂无日志</td>
                    </tr>
                    {/if}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>


<style>
    p{
        padding:0px;
        margin:0px;
    }
    .panel-body{
        font-size: 14px;
        line-height: 25px;
        background-color: #f9f9f9;
    }
    .table{

    }
</style>